rm(list = ls())

library(tidyverse)

## Load Data 

btw <- readRDS('data/data_main.RDS') %>%
  mutate(east = as.factor(east))

## 

p1 <- ggplot(btw, aes(x = polar_bund, fill = east, group = east)) + 
  geom_histogram(position = "identity", 
                 bins = 30, 
                 alpha = 0.65,
                 col = 'black') + 
  facet_wrap(~ year, nrow = 2,
             scales = 'free_x') + 
  scale_fill_grey(labels = c('West Germany',
                             'East Germany'),
                  start = 0.3, end = 0.93) + 
  theme_bw() + 
  labs(x = 'Electoral polarization',
       y = 'Number of counties') + 
  theme(legend.position = 'bottom',
        legend.title = element_blank()) +
  scale_y_continuous(breaks = seq(0, 60, 25),
                     labels = seq(0, 60, 25))
p1

